package com.ruoyi.web.controller.system.api.app;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.framework.interceptor.Authentication;
import com.ruoyi.common.redis.RedisClientUtil;
import com.ruoyi.system.api.ResponseWithData;
import com.ruoyi.system.api.domain.test;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName testController
 * @Description: TODO
 * @Author shihx
 * @Date 2020/2/5
 * @Version V1.0
 **/
@Controller
@RequestMapping("/api/app/test")
public class Test222Controller extends BaseController {

    @PostMapping("/test1")
    @ResponseBody
    @Authentication(tokenRequired = true, signRequired = true)
    public ResponseWithData<?> list(@RequestBody test test)
    {

        return new ResponseWithData().success(test);
    }

    @GetMapping("/test2")
    @ResponseBody
    @Authentication(tokenRequired = true, signRequired = true)
    public ResponseWithData<?> list(@RequestParam String name,@RequestParam String password)
    {
//        RedisClientUtil.getInstance().initialPool("127.0.0.1",3301,"redis@guoruan!",1000);
//        RedisClientUtil.getInstance().checkAccessToken("");
        return new ResponseWithData().success(name);
    }


}
